import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/Login/index.vue'
import Layout from '../views/Layout/index.vue'
import Home from '../views/Home/index.vue'
import Electricity from '../views/Electricity/index.vue'
import Water from '../views/Water/index.vue'
import Gas from '../views/GasAndAir/index.vue'
import Report from '../views/Report/index.vue'
import Ranking from '../views/Ranking/index.vue'
import Compares from '../views/Compares/index.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
    { path: '/login', name: 'login', component: Login },
    {
      path: '/',
      redirect: '/login',
      component: Layout,
      children: [
        { path: '/home', component: Home },
        { path: '/electricity', component: Electricity },
        { path: '/water', component: Water },
        { path: '/gas', component: Gas },
        { path: '/report', component: Report },
        { path: '/compares', component: Compares },
        { path: '/ranking', component: Ranking }
      ]
    }
  ]
})

export default router
